/*  
 *  Copyright 2006 Paul Jack.
 *
 *  This file is part of the Dex compiler suite. 
 *  
 *  Dex is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License as published by the
 *  Free Software Foundation; either version 2 of the License, or (at your
 *  option) any later version.
 *  
 *  Dex is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 *  Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 */
package dex.compiler.parser;


import dex.compiler.model.definition.ClassDef;
import dex.compiler.model.definition.Function;
import dex.compiler.model.definition.Macro;
import dex.compiler.model.definition.Modifier;
import dex.compiler.model.definition.Record;
import dex.compiler.model.definition.Unit;
import dex.compiler.model.expression.Expression;
import dex.compiler.model.expression.LiteralFunction;
import dex.compiler.model.expression.LiteralInteger;
import dex.compiler.model.expression.LiteralString;
import dex.compiler.model.expression.NewExpression;
import dex.compiler.model.statement.Block;
import dex.compiler.model.statement.Comment;
import dex.compiler.model.statement.ForStatement;
import dex.compiler.model.statement.IfStatement;
import dex.compiler.model.statement.ReturnStatement;
import dex.compiler.model.statement.Statement;
import dex.compiler.model.statement.SwitchStatement;
import dex.compiler.model.statement.ThrowStatement;
import dex.compiler.model.statement.TryStatement;
import dex.compiler.model.statement.WhileStatement;
import dex.compiler.model.type.TypeNode;


/**
 * The parser for the Dex programming language. 
 */
public class Parser {

	
	private DefinitionParser delegate;
	
	
	/**
	 * Constructs a new parser.
	 * 
	 * @param config  the configuration for the parser
	 */
	public Parser(ParserConfig config) {
		this.delegate = new DefinitionParser(config);
	}


	/**
	 * Parses a block of statements.
	 * 
	 * @return  the parsed block of statements
	 */
	public Block parseBlock() {
		return delegate.parseBlock();
	}


	/**
	 * Parses a class definition.
	 * 
	 * @return  the parsed class definition
	 */
	public ClassDef parseClass() {
		return delegate.parseClass();
	}


	/**
	 * Parses a comment.
	 * 
	 * @return  the parsed comment
	 */
	public Comment parseComment() {
		return delegate.parseComment();
	}


	/**
	 * Parses a declaration.
	 * 
	 * @return  the parsed declaration
	 */
	public Statement parseDeclaration() {
		return delegate.parseDeclaration();
	}


	/**
	 * Parses an expression.
	 * 
	 * @return  the parsed expression
	 */
	public Expression parseExpression() {
		return delegate.parseExpression();
	}

	
	/**
	 * Parses a for statement.
	 * 
	 * @return  the parsed for statement.
	 */
	public ForStatement parseFor() {
		return delegate.parseFor();
	}


	/**
	 * Parses a function definition.
	 * 
	 * @return  the parsed function
	 */
	public Function parseFunction() {
		return delegate.parseFunction();
	}


	/**
	 * Parses a function literal.
	 * 
	 * @return  the parsed function literal
	 */
	public LiteralFunction parseFunctionLiteral() {
		return delegate.parseFunctionLiteral();
	}


	/**
	 * Parses an identifier.
	 * 
	 * @return  the parsed identifier
	 */
	public String parseIdentifier() {
		return delegate.parseIdentifier();
	}


	/**
	 * Parses an if statement.
	 * 
	 * @return  the parsed if statement
	 */
	public IfStatement parseIf() {
		return delegate.parseIf();
	}


	/**
	 * Parses a literal integer.
	 * 
	 * @return  the parsed integer
	 */
	public LiteralInteger parseLiteralInteger() {
		return delegate.parseLiteralInteger();
	}


	/**
	 * Parses a literal string.
	 * 
	 * @return  the parsed string
	 */
	public LiteralString parseLiteralString() {
		return delegate.parseLiteralString();
	}


	/**
	 * Parses a macro invocation.
	 * 
	 * @return  the parsed macro invocation
	 */
	public Macro parseMacro() {
		return delegate.parseMacro();
	}


	/**
	 * Parses a modifier.
	 * 
	 * @return  the parsed modifier
	 */
	public Modifier parseModifier() {
		return delegate.parseModifier();
	}


	/**
	 * Parses a <code>new</code> expression.
	 * 
	 * @return  the parsed expression
	 */
	public NewExpression parseNewExpression() {
		return delegate.parseNewExpression();
	}


	/**
	 * Parses a record definition.
	 * 
	 * @return  the parsed record definition
	 */
	public Record parseRecord() {
		return delegate.parseRecord();
	}


	/**
	 * Parses a return statement/
	 * 
	 * @return  the parsed return statement
	 */
	public ReturnStatement parseReturn() {
		return delegate.parseReturn();
	}


	/**
	 * Parses a source file.
	 * 
	 * @return  the parsed source file.
	 */
	public Unit parseSourceFile() {
		return delegate.parseSourceFile();
	}


	/**
	 * Parses a statement.
	 * 
	 * @return  the parsed statement
	 */
	public Statement parseStatement() {
		return delegate.parseStatement();
	}


	/**
	 * Parses a switch statement.
	 * 
	 * @return  the parsed switch statement
	 */
	public SwitchStatement parseSwitch() {
		return delegate.parseSwitch();
	}


	/**
	 * Parses a throw statement.
	 * 
	 * @return  the parsed throw statement
	 */
	public ThrowStatement parseThrow() {
		return delegate.parseThrow();
	}


	/**
	 * Parses a try statement.
	 * 
	 * @return  the parsed try statement
	 */
	public TryStatement parseTry() {
		return delegate.parseTry();
	}


	/**
	 * Parses a type occurrence.
	 * 
	 * @return  the parsed type occurrence
	 */
	public TypeNode parseType() {
		return delegate.parseType();
	}


	/**
	 * Parses a while statement.
	 * 
	 * @return  the parsed while statement
	 */
	public WhileStatement parseWhile() {
		return delegate.parseWhile();
	}
	

}
